home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / Kubuntu 8.10 / kubuntu-8.10-desktop-i386.iso / casper / filesystem.squashfs / etc / init.d / stop-readahead < prev    next >
Text File  |  2008-10-27  |  1KB  |  46 lines

  1. #!/bin/sh -e
  2. ### BEGIN INIT INFO
  3. # Provides:          stop-readahead
  4. # Required-Start:    $all readahead-desktop
  5. # Required-Stop:
  6. # Default-Start:     2 3 4 5
  7. # Default-Stop:
  8. # Short-Description: init script for stopping readahead profiling
  9. ### END INIT INFO
  10.  
  11. # Check the package is still installed
  12. [ -x /sbin/readahead-list ] || exit 0
  13.  
  14. # Get LSB functions
  15. . /lib/lsb/init-functions
  16. . /etc/default/rcS
  17.  
  18. # This is only necessary if "profile" was on the kernel command-line,
  19. # and thus readahead-watch is running.
  20. grep -q "profile" /proc/cmdline || exit 0
  21.  
  22.  
  23. case "$1" in
  24.     start)
  25.     if [ -f /var/run/readahead-watch-boot.pid ]; then
  26.         /sbin/start-stop-daemon --stop --quiet --oknodo \
  27.         --pidfile /var/run/readahead-watch-boot.pid
  28.  
  29.         rm -f /var/run/readahead-watch-boot.pid
  30.     fi
  31.  
  32.     /sbin/start-stop-daemon --stop --quiet --oknodo \
  33.         --pidfile /var/run/readahead-watch.pid
  34.  
  35.     rm -f /var/run/readahead-watch.pid
  36.     ;;
  37.     stop|restart|force-reload)
  38.     ;;
  39.     *)
  40.     echo "Usage: /etc/init.d/stop-readahead {start|stop|restart|force-reload}"
  41.     exit 1
  42.     ;;
  43. esac
  44.  
  45. exit 0
  46.